<?php

$mysql=new mysqli("localhost","root","root","db");
$op=mysqli_query($mysql,"SELECT id FROM `news`  ");
$num=0;
while($rs=mysqli_fetch_array($op)){
	$res[$num++]="http://url/index.php&id=".$rs['id']."";

}

$urls=$res;

$api = 'http://data.zz.baidu.com/urls?site=url&token=4BjL8izemuZWbJfm';
$ch = curl_init();
$options =  array(
    CURLOPT_URL => $api,
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS => implode("\n", $urls),
    CURLOPT_HTTPHEADER => array('Content-Type: text/plain'),
);
curl_setopt_array($ch, $options);
$result = curl_exec($ch);

var_dump($result);

?>